package com.wuyou.demo;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class BornTenThousandDays {


    public static void main(String[] args) {
        int year = 1997;
        int month = 11;
        int day = 16;

        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.YEAR, year);
        calendar.set(Calendar.MONTH, month - 1);
        calendar.set(Calendar.DAY_OF_MONTH, day);


//        for(int i = 1; i <= 10000; i ++){
//            calendar.set(Calendar.DAY_OF_YEAR, calendar.get(Calendar.DAY_OF_YEAR)  + 1);
//            System.out.println("年 \t" +calendar.get(Calendar.YEAR));
//            System.out.println("月 \t" +(calendar.get(Calendar.MONTH) + 1));
//            System.out.println("日 \t" +calendar.get(Calendar.DAY_OF_MONTH));
//            System.out.println();
//        }
        calendar.set(Calendar.DAY_OF_YEAR, calendar.get(Calendar.DAY_OF_YEAR) + 10000);
        System.out.println("年 \t" + calendar.get(Calendar.YEAR));
        System.out.println("月 \t" + (calendar.get(Calendar.MONTH) + 1));
        System.out.println("日 \t" + calendar.get(Calendar.DAY_OF_MONTH));
        SimpleDateFormat x = new SimpleDateFormat("yyyy-MM-dd");

        System.out.println(x.format(calendar.get(Calendar.DATE)));
    }
}
